package com.yj.limit;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/limit")
@Slf4j
public class LimitRequestController {


    @RequestLimit(key = "limit", limit = 10, period = 60000)
    @GetMapping()
    public String limitRequest() throws InterruptedException {
        log.info("Limit Request");
        return "Limit Request";
    }
}
